<template>
    <div v-if="$slots.left || $slots.right" class="topRow">
        <div>
            <slot name="left" />
        </div>
        <div>
            <slot name="right" />
        </div>
    </div>
    <yfTable :columns="columns" v-bind="{ ...$attrs, style: ''}" />
</template>
  
<script setup lang="ts">
import yfTable, { TableColumn } from './table.vue';

/* ****** 组件定义 ****** */
defineProps<{ columns: TableColumn[] }>()
defineEmits<{
    (e: 'btnClick', action: string): string
}>();

/* ****** 向外暴露的属性 ****** */
defineExpose({});
</script>
  
<style lang="scss" scoped>
.topRow {
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  margin-bottom: 10px;

  .item {
    display: flex;
  }
}
</style>
  